'use strict';

/**
 * Config for the router
 */
angular.module('app').config(['$stateProvider', '$urlRouterProvider', '$libLoadProvider',function ($stateProvider,   $urlRouterProvider,$libLoadProvider) {
       
	
	
	

          $urlRouterProvider.otherwise('/access/signin');
          
          $stateProvider
              // others
              .state('lockme', {
                  url: '/lockme',
                  templateUrl: 'modular/system/tpl/page_lockme.html'
              })
              .state('access', {
                  url: '/access',
                  template: '<div ui-view class="fade-in-right-big smooth"></div>'
              })
              .state('access.signin', {
                  url: '/signin',
                  templateUrl: 'modular/system/tpl/page_signin.html',
                  resolve: $libLoadProvider.load( ['modular/system/controllers/signinCtl.js'] )
              })
              .state('access.signup', {
                  url: '/signup',
                  templateUrl: 'modular/system/tpl/page_signup.html',
                  resolve: $libLoadProvider.load( ['modular/system/controllers/signupCtl.js'] )
              })
              .state('access.forgotpwd', {
                  url: '/forgotpwd',
                  templateUrl: 'modular/system/tpl/page_forgotpwd.html'
              })
              .state('access.404', {
                  url: '/404',
                  templateUrl: 'modular/system/tpl/page_404.html'
              });
              
              
          $stateProvider.state('app', {
              abstract: true,
              url: '/app',
              templateUrl: "modular/system/tpl/app.html"
          })
          .state('app.dashboard', {
              url: '/dashboard',
              templateUrl: 'modular/system/tpl/app_dashboard.html',
              resolve: $libLoadProvider.load(['modular/system/controllers/dashboardCtl.js'])
          });


          
      
          
          
          
          
          
          
          
          
          
          
          
      }
    ]
  );
